--------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/02_JEEA_Replication_log.txt
  log type:  text
 opened on:  25 Jun 2026, 12:48:32
r; t=0.01 12:48:32

. 
. di "=================================================================="
==================================================================
r; t=0.00 12:48:32

. di "  02_JEEA_Replication.do"
  02_JEEA_Replication.do
r; t=0.00 12:48:32

. di "  Date: $S_DATE  Time: $S_TIME"
  Date: 25 Jun 2026  Time: 12:48:32
r; t=0.00 12:48:32

. di "=================================================================="
==================================================================
r; t=0.00 12:48:32

. 
. use "$clean/PEP_Analysis_Sample.dta", clear
(PEP analysis sample (JEEA-style + extended outcome indices))
r; t=0.08 12:48:32

. keep if wave_num == 1
(5,351 observations deleted)
r; t=0.04 12:48:32

. 
. di "  PEP_Analysis_Sample W1 (starting): " _N
  PEP_Analysis_Sample W1 (starting): 8229
r; t=0.00 12:48:32

. 
. /*==============================================================================
>   PART 1: BUILD JEEA-EQUIVALENT SAMPLE
> ==============================================================================*/
. 
. * JEEA's $all_controls (RepMaterials.do line 649)
. local all_controls hhven_parents hhven_spouse hhven_other jobopp labven   ///
>                   typeworkven1 typeworkven2 typeworkven3 ///
>                   written_cont average yrseduc healthmig frdfam ///
>                   smartven owner electven waterven sewageven female ///
>                   age_panel child_venez time_col
r; t=0.00 12:48:32

. 
. * Build sample_reg analogue (head has non-missing key outcomes)
. gen sample_roster = .
(8,229 missing values generated)
r; t=0.00 12:48:32

. qui reg trt_hh `all_controls'
r; t=2.27 12:48:34

. replace sample_roster = e(sample)
(8,229 real changes made)
r; t=0.00 12:48:34

. replace sample_roster = 0 if gasto_capita == . & trt_hh != .
(4 real changes made)
r; t=0.00 12:48:34

. replace sample_roster = 0 if employed == . & trt_hh != .
(87 real changes made)
r; t=0.00 12:48:34

. replace sample_roster = 0 if hora_semana == . & trt_hh != . & asalariado_num == 1
(35 real changes made)
r; t=0.00 12:48:34

. replace sample_roster = 0 if anx_depr == .
(1 real change made)
r; t=0.00 12:48:34

. replace sample_roster = 0 if health_pca == .
(6 real changes made)
r; t=0.00 12:48:34

. bysort family_id: egen sample_reg = max(sample_roster)
r; t=0.02 12:48:34

. 
. * Keep respondent (orden==1) + partner (orden==2)
. keep if (orden == 1 | orden == 2) & sample_reg == 1
(3,912 observations deleted)
r; t=0.02 12:48:34

. di "  After JEEA sample restrictions: " _N
  After JEEA sample restrictions: 4317
r; t=0.00 12:48:34

. 
. * Department + sample fixed effects (JEEA's `dpt1..4 smpl1..3`)
. tab dpto_fe, gen(dpt)

 Department |
         FE |
  (grouped) |      Freq.     Percent        Cum.
------------+-----------------------------------
          5 |        774       17.93       17.93
          8 |        849       19.67       37.60
         11 |      1,626       37.67       75.26
         54 |        391        9.06       84.32
        100 |        677       15.68      100.00
------------+-----------------------------------
      Total |      4,317      100.00
r; t=0.00 12:48:34

. tab sample_fe, gen(smpl)

   Sampling |
    city FE |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      1,679       38.89       38.89
          2 |        735       17.03       55.92
          3 |        916       21.22       77.14
         20 |        987       22.86      100.00
------------+-----------------------------------
      Total |      4,317      100.00
r; t=0.00 12:48:34

. local fe dpt1 dpt2 dpt3 dpt4 smpl1 smpl2 smpl3
r; t=0.00 12:48:34

. 
. /*==============================================================================
>   PART 2: BUILD JEEA-STYLE INDICES (control-group standardization)
> ==============================================================================*/
. 
. * Standardize each component using control-group (pep == 0) mean and SD.
. capture program drop _jee_std
r; t=0.00 12:48:34

. program define _jee_std
  1.     args src dst
  2.     capture confirm variable `src'
  3.     if _rc exit
  4.     qui sum `src' if pep == 0
  5.     if r(N) == 0 | r(sd) == 0 exit
  6.     capture drop `dst'
  7.     gen `dst' = (`src' - r(mean)) / r(sd)
  8. end
r; t=0.00 12:48:34

. 
. * The data may already contain jeea_index_* (pre-built by 03_OutcomeConstruction
. * on the full analysis sample). For the JEEA replication we want them
. * standardized on the JEEA analysis sample (orden in {1,2}, sample_reg==1).
. * Drop the pre-built versions and recompute here.
. foreach v in jeea_index_wellbeing jeea_index_labor jeea_index_services {
  2.     capture drop `v'
  3. }
r; t=0.00 12:48:34

. 
. * Well-being index = mean(std consumption, std income, std employed)
. _jee_std gasto_capita      jstd_consumption
r; t=0.00 12:48:34

. _jee_std labour_income     jstd_income
(1,632 missing values generated)
r; t=0.00 12:48:34

. _jee_std employed          jstd_employed
(321 missing values generated)
r; t=0.00 12:48:34

. egen jeea_index_wellbeing_raw = rowmean(jstd_consumption jstd_income jstd_employed)
r; t=0.01 12:48:34

. egen jeea_index_wellbeing = std(jeea_index_wellbeing_raw)
r; t=0.01 12:48:34

. label var jeea_index_wellbeing "Well-being index (JEEA std)"
r; t=0.00 12:48:34

. 
. * Labor index = mean(std formal, std log hours)
. _jee_std formal            jstd_formal
(1,953 missing values generated)
r; t=0.00 12:48:35

. _jee_std hora_semana       jstd_hours
(2,017 missing values generated)
r; t=0.00 12:48:35

. egen jeea_index_labor_raw = rowmean(jstd_formal jstd_hours)
(1,953 missing values generated)
r; t=0.00 12:48:35

. egen jeea_index_labor = std(jeea_index_labor_raw)
(1,953 missing values generated)
r; t=0.00 12:48:35

. label var jeea_index_labor "Labor outcomes index (JEEA std)"
r; t=0.00 12:48:35

. 
. * Services index = mean(std sisben, std subs, std bank, std govtr)
. _jee_std sisben            jstd_sisben
(24 missing values generated)
r; t=0.01 12:48:35

. _jee_std subs              jstd_subs
r; t=0.00 12:48:35

. _jee_std bank              jstd_bank
(8 missing values generated)
r; t=0.00 12:48:35

. _jee_std govtr             jstd_govtr
(3 missing values generated)
r; t=0.00 12:48:35

. egen jeea_index_services_raw = rowmean(jstd_sisben jstd_subs jstd_bank jstd_govtr)
r; t=0.01 12:48:35

. egen jeea_index_services = std(jeea_index_services_raw)
r; t=0.00 12:48:35

. label var jeea_index_services "Services index (JEEA std)"
r; t=0.00 12:48:35

. 
. drop jstd_* jeea_index_*_raw
r; t=0.00 12:48:35

. 
. /*==============================================================================
>   PART 3: FIRST STAGE
> ==============================================================================*/
. 
. di ""

r; t=0.00 12:48:35

. di "--- First stage: rdrobust pep date ---"
--- First stage: rdrobust pep date ---
r; t=0.00 12:48:35

. rdrobust pep date, c(0)
Mass points detected in the running variable.

Sharp RD estimates using local polynomial regression.

      Cutoff c = 0 | Left of c  Right of c            Number of obs =       3871
-------------------+----------------------            BW type       =      mserd
     Number of obs |      1034        2837            Kernel        = Triangular
Eff. Number of obs |       329         503            VCE method    =         NN
    Order est. (p) |         1           1
    Order bias (q) |         2           2
       BW est. (h) |    63.135      63.135
       BW bias (b) |   107.660     107.660
         rho (h/b) |     0.586       0.586
        Unique obs |       173         463

Outcome: pep. Running variable: date.
--------------------------------------------------------------------------------
                   | Point         | Robust Inference
                   | Estimate      | z-stat        P>|z|    [95% Conf. Interval]
-------------------+------------------------------------------------------------
         RD Effect |  .41291       | 5.9971        0.000     .267167     .526578
--------------------------------------------------------------------------------
Estimates adjusted for mass points in the running variable.
r; t=0.32 12:48:35

. local fs_b  = e(tau_cl)
r; t=0.00 12:48:35

. local fs_se = e(se_tau_cl)
r; t=0.00 12:48:35

. local fs_p  = e(pv_cl)
r; t=0.00 12:48:35

. local fs_h  = e(h_l)
r; t=0.00 12:48:35

. local fs_n  = e(N_h_l) + e(N_h_r)
r; t=0.00 12:48:35

. 
. * Plot uses `daterd` so x-axis reads naturally: LEFT (negative) = before
. * deadline = eligible side, where PEP take-up is high.
. rdplot pep daterd if abs(daterd) <= 206, c(0) p(1) ///
>     graph_options(title("First stage: PEP-RAMV at the deadline (Wave 1)", size(medium)) ///
>                   ytitle("Pr(individual has PEP-RAMV)") ///
>                   xtitle("Days from June 8, 2018 deadline (negative = before, eligible)"))
Mass points detected in the running variable.

RD Plot with evenly spaced mimicking variance number of bins using polynomial regression.

         Cutoff c = 0 | Left of c  Right of c        Number of obs  =       2721
----------------------+----------------------        Kernel         =    Uniform
        Number of obs |      1678        1043
   Eff. Number of obs |      1678        1043
  Order poly. fit (p) |         1           1
     BW poly. fit (h) |   206.000     206.000
 Number of bins scale |     1.000       1.000

Outcome: pep. Running variable: daterd.
---------------------------------------------
                      | Left of c  Right of c
----------------------+----------------------
        Bins selected |        44          44
   Average bin length |     4.682       4.682
    Median bin length |     4.682       4.682
----------------------+----------------------
    IMSE-optimal bins |         6           9
  Mimicking Var. bins |        44          44
----------------------+----------------------
Rel. to IMSE-optimal: | 
        Implied scale |     7.333       4.889
    WIMSE var. weight |     0.003       0.008
    WIMSE bias weight |     0.997       0.992
---------------------------------------------

r; t=10.49 12:48:45

. graph export "$out/Fig_FirstStage_W1.png", replace width(1000)
(file ../outputs/Fig_FirstStage_W1.png not found)
file ../outputs/Fig_FirstStage_W1.png saved as PNG format
r; t=0.14 12:48:45

. 
. /*==============================================================================
>   PART 4: FUZZY RD ON JEEA OUTCOMES
> ==============================================================================*/
. 
. di ""

r; t=0.00 12:48:45

. di "--- Fuzzy RD on JEEA outcomes (using JEEA-convention treatment) ---"
--- Fuzzy RD on JEEA outcomes (using JEEA-convention treatment) ---
r; t=0.00 12:48:45

. 
. * Outcomes paired with their JEEA-convention treatment variable.
. * Parallel lists (avoids the compound-quote parse trap with subinstr).
. local jee_outcomes ///
>     jeea_index_wellbeing labour_income income_maxhh gasto_capita ///
>     employed jeea_index_labor formal hora_semana ///
>     jeea_index_services sisben subs bank govtr ///
>     health_pca anx_depr
r; t=0.00 12:48:45

. local jee_treatments ///
>     pep pep trt_hh trt_hh ///
>     pep pep pep pep ///
>     pep pep pep trt_hh trt_hh ///
>     pep pep
r; t=0.00 12:48:45

. 
. local lbl_jeea_index_wellbeing "Well-being index"
r; t=0.00 12:48:45

. local lbl_labour_income        "Log labor income (individual)"
r; t=0.00 12:48:45

. local lbl_income_maxhh         "Log HH-max labor income"
r; t=0.00 12:48:45

. local lbl_gasto_capita         "Log per-capita HH consumption"
r; t=0.00 12:48:45

. local lbl_employed             "Employed"
r; t=0.00 12:48:45

. local lbl_jeea_index_labor     "Labor outcomes index"
r; t=0.00 12:48:45

. local lbl_formal               "Formal employment"
r; t=0.00 12:48:45

. local lbl_hora_semana          "Log weekly hours"
r; t=0.00 12:48:45

. local lbl_jeea_index_services  "Services index"
r; t=0.00 12:48:45

. local lbl_sisben               "SISBEN registration"
r; t=0.00 12:48:45

. local lbl_subs                 "Subsidized health"
r; t=0.00 12:48:45

. local lbl_bank                 "Bank account"
r; t=0.00 12:48:45

. local lbl_govtr                "Govt transfers"
r; t=0.00 12:48:45

. local lbl_health_pca           "Health PCA"
r; t=0.00 12:48:45

. local lbl_anx_depr             "Anxiety/depression"
r; t=0.00 12:48:45

. 
. tempname B
r; t=0.00 12:48:45

. matrix `B' = J(1, 9, .)
r; t=0.00 12:48:45

. local rownames ""
r; t=0.00 12:48:45

. local treatments ""
r; t=0.00 12:48:45

. 
. local n_specs : word count `jee_outcomes'
r; t=0.00 12:48:45

. forvalues j = 1/`n_specs' {
  2.     local outcome   : word `j' of `jee_outcomes'
  3.     local treatment : word `j' of `jee_treatments'
  4. 
.     capture confirm variable `outcome'
  5.     if _rc continue
  6. 
.     * No controls
.     capture rdrobust `outcome' date, c(0) fuzzy(`treatment') ///
>         kernel(triangular) bwselect(mserd) p(1) all level(95)
  7.     if _rc continue
  8.     local b_nc = e(tau_cl)
  9.     local s_nc = e(se_tau_cl)
 10.     local p_nc = e(pv_cl)
 11.     local n_nc = e(N_h_l) + e(N_h_r)
 12. 
.     * With controls + FE
.     capture rdrobust `outcome' date, c(0) fuzzy(`treatment') ///
>         kernel(triangular) bwselect(mserd) p(1) all level(95) ///
>         covs(`all_controls' `fe')
 13.     local b_c = .
 14.     local s_c = .
 15.     local p_c = .
 16.     local n_c = .
 17.     if !_rc {
 18.         local b_c = e(tau_cl)
 19.         local s_c = e(se_tau_cl)
 20.         local p_c = e(pv_cl)
 21.         local n_c = e(N_h_l) + e(N_h_r)
 22.     }
 23. 
.     matrix `B' = (nullmat(`B') \ ///
>         (`b_nc', `s_nc', `p_nc', `n_nc', `b_c', `s_c', `p_c', `n_c', .))
 24.     local rownames "`rownames' `outcome'"
 25.     local treatments "`treatments' `treatment'"
 26. }
r; t=28.83 12:49:14

. matrix `B' = `B'[2..., 1...]
r; t=0.00 12:49:14

. matrix rownames `B' = `rownames'
r; t=0.00 12:49:14

. 
. di ""

r; t=0.00 12:49:14

. di "--- JEEA replication results ---"
--- JEEA replication results ---
r; t=0.00 12:49:14

. di %-30s "Outcome" %5s "Trt" %10s "Coef NC" %10s "SE" %10s "p" %10s "Coef +X" %10s "SE" %10s "p"
Outcome                         Trt   Coef NC        SE         p   Coef +X        SE         p
r; t=0.00 12:49:14

. forvalues r = 1/`=rowsof(`B')' {
  2.     local nm  : word `r' of `rownames'
  3.     local trt : word `r' of `treatments'
  4.     local s1 = ""
  5.     if `B'[`r',3] < 0.10 local s1 "+"
  6.     if `B'[`r',3] < 0.05 local s1 "*"
  7.     if `B'[`r',3] < 0.01 local s1 "**"
  8.     local s2 = ""
  9.     if `B'[`r',7] < 0.10 local s2 "+"
 10.     if `B'[`r',7] < 0.05 local s2 "*"
 11.     if `B'[`r',7] < 0.01 local s2 "**"
 12.     di %-30s "`nm'" %5s "`trt'" ///
>        %10.3f `B'[`r',1] %10.3f `B'[`r',2] %10.3f `B'[`r',3] ///
>        %10.3f `B'[`r',5] %10.3f `B'[`r',6] %10.3f `B'[`r',7] "  `s1'/`s2'"
 13. }
jeea_index_wellbeing            pep     1.024     0.322     0.001     1.017     0.389     0.009  **/**
labour_income                   pep     0.223     0.099     0.025     0.394     0.167     0.018  */*
income_maxhh                  trt_hh     0.223     0.071     0.002     0.214     0.079     0.007  **/**
gasto_capita                  trt_hh     0.503     0.153     0.001     0.445     0.151     0.003  **/**
employed                        pep     0.160     0.166     0.335     0.180     0.227     0.429  /
jeea_index_labor                pep     0.347     0.458     0.448     0.276     0.713     0.699  /
formal                          pep     0.134     0.079     0.092     0.130     0.124     0.294  +/
hora_semana                     pep    -0.167     0.215     0.437    -0.086     0.286     0.763  /
jeea_index_services             pep     1.591     0.180     0.000     1.613     0.291     0.000  **/**
sisben                          pep     0.534     0.094     0.000     0.506     0.126     0.000  **/**
subs                            pep     0.322     0.104     0.002     0.282     0.123     0.021  **/*
bank                          trt_hh     0.396     0.085     0.000     0.408     0.085     0.000  **/**
govtr                         trt_hh     0.193     0.081     0.017     0.195     0.087     0.025  */*
health_pca                      pep     1.224     0.559     0.029     0.697     0.602     0.246  */
anx_depr                        pep     0.007     0.080     0.935     0.013     0.121     0.918  /
r; t=0.00 12:49:14

. 
. /*==============================================================================
>   PART 5: LATEX TABLE
> ==============================================================================*/
. 
. file open tex using "$out/02_JEEA_Replication.tex", write replace
(file ../outputs/02_JEEA_Replication.tex not found)
r; t=0.00 12:49:14

. file write tex "\documentclass[11pt]{article}\usepackage[margin=1in]{geometry}" _n
r; t=0.00 12:49:14

. file write tex "\usepackage{booktabs,graphicx,float}" _n
r; t=0.00 12:49:14

. file write tex "\title{JEEA Replication --- Wave 1}\author{Sandra Rozo}\date{\today}" _n
r; t=0.00 12:49:14

. file write tex "\begin{document}\maketitle" _n
r; t=0.00 12:49:14

. file write tex "\section*{First stage}" _n
r; t=0.00 12:49:14

. file write tex "\begin{tabular}{lr}\toprule" _n
r; t=0.00 12:49:14

. file write tex "Coefficient & " %5.3f (`fs_b') " \\" _n
r; t=0.00 12:49:14

. file write tex "Standard error & " %5.3f (`fs_se') " \\" _n
r; t=0.00 12:49:14

. file write tex "p-value & " %5.3f (`fs_p') " \\" _n
r; t=0.00 12:49:14

. file write tex "Bandwidth (days) & " %4.1f (`fs_h') " \\" _n
r; t=0.00 12:49:14

. file write tex "Effective N & " (`fs_n') " \\\bottomrule\end{tabular}" _n
r; t=0.00 12:49:14

. 
. file write tex "\section*{Tables 4--6 (replication): Fuzzy RD, Wave 1}" _n
r; t=0.00 12:49:14

. file write tex "\begin{tabular}{llrrrr}\toprule" _n
r; t=0.00 12:49:14

. file write tex " & Treat. & \multicolumn{2}{c}{No controls} & \multicolumn{2}{c}{With controls} \\" _n
r; t=0.00 12:49:14

. file write tex "Outcome & (HH/ind) & Coef. & SE & Coef. & SE \\\midrule" _n
r; t=0.00 12:49:14

. forvalues r = 1/`=rowsof(`B')' {
  2.     local nm  : word `r' of `rownames'
  3.     local trt : word `r' of `treatments'
  4.     local lbl : copy local lbl_`nm'
  5.     if "`lbl'" == "" local lbl "`nm'"
  6.     local trtshow = cond("`trt'" == "trt_hh", "HH", "ind")
  7.     local b1 = `B'[`r',1]
  8.     local s1 = `B'[`r',2]
  9.     local p1 = `B'[`r',3]
 10.     local b2 = `B'[`r',5]
 11.     local s2 = `B'[`r',6]
 12.     local p2 = `B'[`r',7]
 13.     local star1 = ""
 14.     if `p1' < 0.10 local star1 "$^{+}$"
 15.     if `p1' < 0.05 local star1 "$^{*}$"
 16.     if `p1' < 0.01 local star1 "$^{**}$"
 17.     local star2 = ""
 18.     if `p2' < 0.10 local star2 "$^{+}$"
 19.     if `p2' < 0.05 local star2 "$^{*}$"
 20.     if `p2' < 0.01 local star2 "$^{**}$"
 21.     file write tex "`lbl' & `trtshow' & " %5.3f (`b1') "`star1'" " & " %5.3f (`s1') ///
>         " & " %5.3f (`b2') "`star2'" " & " %5.3f (`s2') " \\" _n
 22. }
r; t=0.00 12:49:14

. file write tex "\bottomrule\end{tabular}\par\smallskip\footnotesize" _n
r; t=0.00 12:49:14

. file write tex "\$^{+}\$ p\$<\$0.10, \$^{*}\$ p\$<\$0.05, \$^{**}\$ p\$<\$0.01. " _n
r; t=0.00 12:49:14

. file write tex "fuzzy(\\texttt{trt\\_hh}) for HH outcomes; fuzzy(\\texttt{pep}) for individual." _n
r; t=0.00 12:49:14

. file write tex "\end{document}" _n
r; t=0.00 12:49:14

. file close tex
r; t=0.00 12:49:14

. 
. /*==============================================================================
>   PART 6: NATIVE PDF
> ==============================================================================*/
. 
. putpdf clear
r; t=0.05 12:49:14

. putpdf begin
r; t=0.01 12:49:14

. putpdf paragraph, halign(center)
r; t=0.05 12:49:14

. putpdf text ("JEEA Replication — Wave 1"), bold font(, 16)
r; t=0.01 12:49:14

. putpdf paragraph, halign(center)
r; t=0.05 12:49:14

. putpdf text ("Generated $S_DATE"), italic
r; t=0.00 12:49:14

. 
. putpdf paragraph
r; t=0.00 12:49:14

. putpdf text ("First stage"), bold font(, 13)
r; t=0.00 12:49:15

. putpdf table fs = (5, 2), border(all)
r; t=0.02 12:49:15

. putpdf table fs(1,1) = ("Statistic"), bold
r; t=0.01 12:49:15

. putpdf table fs(1,2) = ("Value"), bold
r; t=0.00 12:49:15

. putpdf table fs(2,1) = ("Coefficient")
r; t=0.00 12:49:15

. putpdf table fs(2,2) = ("`=string(`fs_b', "%5.3f")'")
r; t=0.00 12:49:15

. putpdf table fs(3,1) = ("Standard error")
r; t=0.00 12:49:15

. putpdf table fs(3,2) = ("`=string(`fs_se', "%5.3f")'")
r; t=0.00 12:49:15

. putpdf table fs(4,1) = ("p-value")
r; t=0.00 12:49:15

. putpdf table fs(4,2) = ("`=string(`fs_p', "%5.3f")'")
r; t=0.00 12:49:15

. putpdf table fs(5,1) = ("Effective N")
r; t=0.00 12:49:15

. putpdf table fs(5,2) = ("`fs_n'")
r; t=0.00 12:49:15

. 
. putpdf paragraph, halign(center)
r; t=0.01 12:49:15

. putpdf image "$out/Fig_FirstStage_W1.png", width(5)
r; t=0.01 12:49:15

. 
. putpdf pagebreak
r; t=0.01 12:49:15

. putpdf paragraph
r; t=0.00 12:49:15

. putpdf text ("Fuzzy RD on JEEA outcomes (W1)"), bold font(, 13)
r; t=0.00 12:49:15

. 
. local nrows = rowsof(`B') + 2
r; t=0.00 12:49:15

. putpdf table tab = (`nrows', 6), border(all)
r; t=0.00 12:49:15

. putpdf table tab(1,1) = ("Outcome"), bold halign(center)
r; t=0.00 12:49:15

. putpdf table tab(1,2) = ("Treatment"), bold halign(center)
r; t=0.00 12:49:15

. putpdf table tab(1,3) = ("Coef. (no ctrls)"), bold halign(center)
r; t=0.00 12:49:15

. putpdf table tab(1,4) = ("SE"), bold halign(center)
r; t=0.00 12:49:15

. putpdf table tab(1,5) = ("Coef. (+ ctrls)"), bold halign(center)
r; t=0.00 12:49:15

. putpdf table tab(1,6) = ("SE"), bold halign(center)
r; t=0.00 12:49:15

. 
. forvalues r = 1/`=rowsof(`B')' {
  2.     local nm  : word `r' of `rownames'
  3.     local trt : word `r' of `treatments'
  4.     local lbl : copy local lbl_`nm'
  5.     if "`lbl'" == "" local lbl "`nm'"
  6.     local trtshow = cond("`trt'" == "trt_hh", "HH", "ind")
  7.     local row = `r' + 1
  8.     local b1 = `B'[`r',1]
  9.     local s1 = `B'[`r',2]
 10.     local p1 = `B'[`r',3]
 11.     local b2 = `B'[`r',5]
 12.     local s2 = `B'[`r',6]
 13.     local p2 = `B'[`r',7]
 14.     local star1 = ""
 15.     if `p1' < 0.10 local star1 "+"
 16.     if `p1' < 0.05 local star1 "*"
 17.     if `p1' < 0.01 local star1 "**"
 18.     local star2 = ""
 19.     if `p2' < 0.10 local star2 "+"
 20.     if `p2' < 0.05 local star2 "*"
 21.     if `p2' < 0.01 local star2 "**"
 22.     putpdf table tab(`row',1) = ("`lbl'")
 23.     putpdf table tab(`row',2) = ("`trtshow'")
 24.     putpdf table tab(`row',3) = ("`=string(`b1', "%5.3f")'`star1'")
 25.     putpdf table tab(`row',4) = ("`=string(`s1', "%5.3f")'")
 26.     putpdf table tab(`row',5) = ("`=string(`b2', "%5.3f")'`star2'")
 27.     putpdf table tab(`row',6) = ("`=string(`s2', "%5.3f")'")
 28. }
r; t=0.04 12:49:15

. putpdf table tab(`nrows',1) = ("+ p<0.10, * p<0.05, ** p<0.01"), italic
r; t=0.00 12:49:15

. 
. putpdf save "$out/02_JEEA_Replication.pdf", replace
successfully created "C:/Users/wb614536/Downloads/replication/replication/outputs/02_JEEA_Replication.pdf"
r; t=0.04 12:49:15

. 
. di ""

r; t=0.00 12:49:15

. di "  PDF saved: $out/02_JEEA_Replication.pdf"
  PDF saved: ../outputs/02_JEEA_Replication.pdf
r; t=0.00 12:49:15

. di "  TeX saved: $out/02_JEEA_Replication.tex"
  TeX saved: ../outputs/02_JEEA_Replication.tex
r; t=0.00 12:49:15

. di "  Done."
  Done.
r; t=0.00 12:49:15

. 
. log close
      name:  <unnamed>
       log:  C:\Users\wb614536\Downloads\replication\replication\code\../outputs/02_JEEA_Replication_log.txt
  log type:  text
 closed on:  25 Jun 2026, 12:49:15
--------------------------------------------------------------------------------------------------------------------
